package com.wjj.service;

import com.wjj.dto.StudentDTO;
import com.wjj.service.hystrix.StudentInternalServiceHystrix;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Description 供微服务直接调用
 * @Author junjun Wang
 * @Date Create in 21:59 2023/12/7
 **/
@FeignClient(value = "student-service", fallback = StudentInternalServiceHystrix.class)
public interface StudentInternalService {

	/**
	 * Get Students By Class Id
	 *
	 * @param classId
	 * @return
	 */
	@GetMapping("/get-student/{classId}")
	List<StudentDTO> getStudentsByClassId(@PathVariable("classId") Integer classId);

}
